# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pyinstaller-hooks-contrib
_pkgname=pyinstaller_hooks_contrib
pkgver=2025.10
pkgrel=1
pkgdesc='PyInstaller community hooks.'
arch=('any')
groups=('blackarch' 'blackarch-misc')
url='https://github.com/pyinstaller/pyinstaller-hooks-contrib'
license=('custom:mixed')
depends=('python')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('7c1a329246887ec27109f70e270a74853361b5b0f4fcf273e33a28668cdf9cec0a077d9684d60bbb0bc0d9f2fb885e756ed6826d36072e3004576d44cea1f9de')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $pkgname
}

